﻿#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QSystemTrayIcon>
#include <windows.h>

#ifdef Q_OS_WIN
#pragma comment(lib, "user32.lib")
#include <qt_windows.h>
#endif

#define MAX_KEY_LENGTH 255
#define MAX_VALUE_NAME 16383

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
    void setSystemMenu();

public slots:
    void systemExit(bool b);
    void init();
    void autoRun(bool run); //不好用
    void autoRun2(bool run);
    void QueryKey(HKEY hKey);   //遍历注册表

private:
    Ui::Widget *ui;
    QSystemTrayIcon *trayIcon;

};

#endif // WIDGET_H
